package com.xique.door.project.miniprogram.biz.service.impl;

import com.xique.common.core.web.domain.AjaxResult;
import com.xique.door.mapper.BuildAreaMapper;
import com.xique.door.project.miniprogram.biz.service.IMiniLocationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.math.BigDecimal;

@Service
public class MiniLocationServiceImpl implements IMiniLocationService {
  @Autowired private BuildAreaMapper buildAreaMapper;

  @Override
  public AjaxResult seleceteDistance(BigDecimal lng, BigDecimal lat) {
    return AjaxResult.success(buildAreaMapper.seleceteDistance(lng, lat,null));
  }

  @Override
  public AjaxResult seleceteArea(BigDecimal lng, BigDecimal lat) {
    return AjaxResult.success(buildAreaMapper.seleceteDistance(lng, lat,null).get(0));
  }
}
